import axios from '@/libs/api.request'
import platform from '@/config/platform'
// 修改
/**
 * @param { 职务管理 }
 */
// 添加职务
export const addPost = data => {
        return axios.request({
            url: platform.BOOKING + '/post',
            method: 'post',
            data
        })
    }
    // 编辑职务
export const editPost = data => {
        return axios.request({
            url: platform.BOOKING + '/post',
            method: 'put',
            data
        })
    }
    // 编辑职务
export const lookPost = id => {
        return axios.request({
            url: platform.BOOKING + `/post/${id}`,
            method: 'get',
        })
    }
    /**
     * @param { 打印模板管理 }
     */
    // 添加职务
export const addPrint = data => {
        return axios.request({
            url: platform.BOOKING + '/print-temp',
            method: 'post',
            data
        })
    }
    // 编辑职务
export const editPrint = data => {
        return axios.request({
            url: platform.BOOKING + '/print-temp',
            method: 'put',
            data
        })
    }
    // 回显职务
export const lookPrint = id => {
        return axios.request({
            url: platform.BOOKING + `/print-temp/${id}`,
            method: 'get',
        })
    }
    // 获取消息内容
export const getContent = id => {
        return axios.request({
            url: platform.BOOKING + `/print-temp-detail/get-info-variable-enum`,
            method: 'get',
        })
    }
    // 获取字体类型枚举
export const getFontType = id => {
        return axios.request({
            url: platform.BOOKING + `/print-temp-detail/get-font-type-enum`,
            method: 'get',
        })
    }
    // 获取字体类型枚举
export const getFontStyle = id => {
        return axios.request({
            url: platform.BOOKING + `/print-temp-detail/get-font-style-enum`,
            method: 'get',
        })
    }
    // 添加文本
export const addContent = data => {
        return axios.request({
            url: platform.BOOKING + '/print-temp-detail',
            method: 'post',
            data
        })
    }
    // 编辑文本
export const editContent = data => {
        return axios.request({
            url: platform.BOOKING + '/print-temp-detail',
            method: 'put',
            data
        })
    }
    // 回显文本
export const lookContent = id => {
        return axios.request({
            url: platform.BOOKING + `/print-temp-detail/${id}`,
            method: 'get',
        })
    }
    /**
     * @param { 打印人员上/下班 }
     */
export const printPeople = data => {
    return axios.request({
        url: platform.BOOKING + '/checkpoint-work-time-config/save',
        method: 'post',
        data
    })
}